<div class="container">
<?php echo $this->render('left.phtml'); ?>
    <!-- Begin FURNITURE -->
    <div class="main-container">
        <div class="title-main-container">
            <span style="text-transform: uppercase;"><?php echo $this->categoryName; ?></span>
        </div>
        
        <?php
            if(count($this->data) > 0) :
            $common = new Admincp_Model_Common();
            foreach($this->data as $value) :
        ?>
        <div class="product-content">
            <div class="product-images">
                <img src="<?php echo $this->baseUrl('/public/files/furniture/thumbnail/').$value['thumbnail']; ?>" width="228" height="256"/>
                <p class="hover">
                    <a href="<?php echo $this->url(array('action'=>'detail','controller'=>'furniture','module'=>'default','title'=>$value['url'],'id'=>$value['id']),'furnituredetail'); ?>"></a>
                </p> 
                <a class="button-hover" href="<?php echo $this->url(array('action'=>'detail','controller'=>'furniture','module'=>'default','title'=>$value['url'],'id'=>$value['id']),'furnituredetail'); ?>">XEM NGAY</a>
                <?php if($common->dateDiff(date('Y-m-d'), $value['create_date']) <= 3) : ?>
                <span class="title-new">NEW</span>
                <?php endif; ?>
            </div>   
            <div class="product-info">
                <span><?php echo $value['name']; ?></span>
                <?php if($value['sale_price'] != '0') : ?>
                <span class="price"><?php echo $common->formatMoney($value['sale_price']); ?>đ</span>
                <span class="sale_price"><?php echo $common->formatMoney($value['price']); ?>đ</span>
                <?php else : ?>
                <span class="price"><?php echo $common->formatMoney($value['price']); ?>đ</span>
                <?php endif; ?>
            </div>    
        </div>
        <?php endforeach; ?>
    
        <div class="pagination">
            <?php echo $this->paginationControl($this->data, 'Sliding', 'furniture/pagination.phtml'); ?>
        </div>
        <?php else : ?>
        <p>Hiện không có sản phẩm nào</p>
        <?php endif; ?>
    </div>
    <!-- End FURNITURE -->
    
</div>